package com.coco.group.controller;

import com.coco.group.service.GroupBuyItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author minicoco
 * @version 1.0
 * @date 2021/8/1 19:41
 */
@RestController
@RequestMapping("/group/item")
public class GroupBuyItemController {

    @Autowired
    private GroupBuyItemService itemService;

    /**
     * 修改商品库存
     * @param id
     * @param num
     */
    @GetMapping("/updateItemStock")
    public void  updateItemStock(@RequestParam("id")Long id ,@RequestParam("num")int num){
        itemService.updateItemStock(id, num);
    }
}
